/* 理财直融信息维护-转换模块
 * zhanghaitao
 */
import React, { PureComponent } from 'react';
import { Form } from '@ant-design/compatible';
import '@ant-design/compatible/assets/index.css';
import FormDataC from './formDataC';
@Form.create()
class ChangeDataC extends PureComponent {
  state = {
    inits: undefined,
  };
  componentDidMount() {
    this.props.onRef(this);
  }

  // 获取表单数据
  getInfo = () => {
    let formdata = this.formData.getInfo();
    return formdata;
  };

  secucodeChange = (e) => {
    this.props.secucodeChange(e);
  };

  setInits = (e) => {
    this.setState({
      inits: e,
    });
  };

  render() {
    const { inits } = this.state;
    const { form } = this.props;
    return (
      <div>
        <FormDataC type={4} init={inits} onRef={(ref) => (this.formData = ref)} secucodeChange={this.secucodeChange} form={form} />
      </div>
    );
  }
}

export default ChangeDataC;
